<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
namespace Home\Controller;
use OT\DataDictionary;

class NewsController extends HomeController {

	//系统首页
    public function index(){

      $this->bg();
       $list = D('Document')->pagetest(2);
        $this->assign('list',$list['data2']);    
        $this->assign('page',$list['data1']);    
        $this->display('news');
    }
    public function detail(){
        $this->bg();
        $id =$_GET['id'];
        if(isset($id))
        {
            $list = D('Document')->detail($id);
            $this->assign('list',$list);
            $this->display('News_li/news_li');
            
        }
        
        
    }

public function bg(){
       $list = D('Document')->getlist(70);
 $this->assign('bg',$list[2]);
}
}